package com.zyx.mapper;


import com.zyx.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Service;

import java.util.Map;

/***
 * @title StudentMapper
 * @author zyx
 * @create 2022/4/14 11:21
 **/

@Mapper
@Service
public interface StudentMapper {
    @Insert("insert into t_student(student_name) value(#{name})")
    @Options(useGeneratedKeys = true,keyColumn = "id",keyProperty = "id")
    int add(Student student);

    int add(Map<String,Object> map);
}
